package cn.com.nes.site.entity.em.ctce;

/**
 * 建筑结构
 */
public enum JzjgEnum {
    PF("01", "平房"), LF("02", "楼房"), QT("03", "其他"), YD("04", "窑洞"), EHY("05", "瓦房+窑洞");

    private final String code;

    private final String description;

    JzjgEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static JzjgEnum getByCode(String code) {
        for (JzjgEnum a : JzjgEnum.values()) {
            if (a.getCode().equals(code)) {
                return a;
            }
        }
        return null;
    }

    public static JzjgEnum getByDescription(String description) {
        for (JzjgEnum a : JzjgEnum.values()) {
            if (a.getDescription().equals(description)) {
                return a;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
